<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>lu_equipmentManagement</title>
    <!--<link rel="shortcut icon" href="favicon.ico">-->
    <link href="ADMIN_PUBLIC/css/bootstrap.min.css" rel="stylesheet">
    <!--<link href="ADMIN_PUBLIC/css/font-awesome.min.css" rel="stylesheet">-->

    <link href="ADMIN_PUBLIC/css/animate.min.css" rel="stylesheet">
    <link href="ADMIN_PUBLIC/css/style.min.css" rel="stylesheet">

    <link rel="stylesheet" href="ADMIN_PUBLIC/css/lu_common.css">
    <link rel="stylesheet" href="ADMIN_PUBLIC/css/lu_projectProgress.css">
    <link rel="stylesheet" href="ADMIN_PUBLIC/css/lu_salaryManagement.css">
    <link rel="stylesheet" href="ADMIN_PUBLIC/fonts_style/iconfont.css">
    <style>
        .laydate-theme-molv .layui-laydate-main{
            height:300px!important;
        }
        .laydate-theme-molv .layui-laydate-content{
            height:300px!important;
            overflow: hidden!important;
        }
        .table_btn_list_title{
            text-align: right;
            width:200px;
        }
        .add_hiddenBox{
            padding: 0 20px 20px 0;
            max-height:500px;
        }
        input[readonly]{
            background-color: #EDEDED;
            color: #333;
        }
    </style>
</head>
<body class="color_fff row container-fluid">
<div class="row projectProgress_table_BOX">
    <div class="table_BOX">
        <table class="col-sm-12 table table-striped comTableStyle" id="table_table">
            <thead>
            <tr>
                <th><input type="checkbox" id="checkAll" class="checkboxStyle"></th>
                <th style="white-space: nowrap">编号</th>
                <th style="white-space: nowrap">名称</th>
                <th style="white-space: nowrap">类型</th>
                <th style="white-space: nowrap">用途</th>
                <th style="white-space: nowrap">型号规格</th>
                <th style="white-space: nowrap">购入时间</th>
                <!-- <th style="font-size:14px">设备状态</th> -->
                <th style="font-size:14px">资产原值(元)</th>
                <th style="font-size:14px">残值率</th>
                <th style="font-size:14px">折旧年份（月份）</th>
                <th style="font-size:14px">月折旧额(元)</th>
                <th style="white-space: nowrap">操作</th>
            </tr>
            </thead>
            <tbody>
        <volist name = 'data' id = 'v'>
            <tr data-index="{$v.id}">
            <td><input type="checkbox" class="checkboxStyle"></td>
            <td data-name="edit_num">{$v.dev_sn}</td>
            <td data-name="edit_name">{$v.dev_name}</td>
            <td data-name="edit_type">{$v.dev_type}</td>
            <td data-name="edit_yongtu">{$v.dev_yongtu}</td>
            <td data-name="edit_modelSpecifications">{$v.dev_desc}</td>
            <td data-name="edit_time">{$v.dev_time}</td>
            <!-- <td data-name="edit_state">{$v.dev_status}</td> -->
            <td data-name="edit_original_price">{$v.dev_price}</td>
            <td data-name="edit_residual">{$v.dev_can_lv}</td>
            <td data-name="edit_Estimate_userTime">{$v.dev_use_month}</td>
            <td data-name="edit_userPrice_mon">{$v.dev_month_money}</td>
            <td><a href="edit_people" class="edit_table">编辑</a></td>
            </tr>
        </volist>
            </tbody>
        </table>
        <div class="pagination"><ul><li>{$page}</li></ul></div>
        <div class="hidden_box">
            <div class="hidden_box_showBox ">
                <span id="dateVal">筛选</span>
                <i class="iconfont icon-jiantou"></i>
            </div>
            <ul class="hidden_box_hiddenBox">
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">编号：</span>
                    <input type="number" class=" BFBFBF_inputStyle" data-query="num">
                </li>
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">名称：</span>
                    <input type="text" class=" BFBFBF_inputStyle" data-query="name">
                </li>
                <li class=" hidden_box_hiddenBox_list ">
                    <span class="hiddenBox_list_text">购入时间：</span>
                    <input type="text" class=" BFBFBF_inputStyle" id="choose_queryDate" data-query="time" autocomplete="off">
                </li>
                <li class="hiddenBox_list_btn">
                    <button class="btn btn-sm btn-success" id="query">确定</button>
                    <button class="btn btn-sm btn-default">取消</button>
                </li>
            </ul>
        </div>
        <ul class="operation_btn">
            <li><a href="add_people" class="btn btn-success">添加</a></li>
            <li><a href="#import" class="btn btn-success">批量导入</a></li>
            <li><a href="#delete" class="btn btn-success">批量删除</a></li>
        </ul>
        <ul class="animated fadeIn add_hiddenBox" lll="add_people" id="add_people">
            <li class="form-group table_btn_list">
                <label class="col-sm-4 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>编号：</label>
                <div class="col-sm-8">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_num" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>名称：</label>
                <div class="col-sm-8">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_name" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>类型：</label>
                <ul class="col-sm-8 table_btn_list_radio_list" add_name="add_type">
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox-selectedRai"></i>
                        <span>仪器</span>
                    </li>
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox"></i>
                        <span>设备</span>
                    </li>
                </ul>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>用途：</label>
                <ul class="col-sm-8 table_btn_list_radio_list" add_name="add_yongtu">
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox"></i>
                        <span>专用</span>
                    </li>
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox-selectedRai"></i>
                        <span>公用</span>
                    </li>
                </ul>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>型号规格：</label>
                <div class="col-sm-8">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_modelSpecifications" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title">设备功率(kw)：</label>
                <div class="col-sm-8">
                    <input type="number" class=" BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_power" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>购入时间：</label>
                <div class="col-sm-8">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="add_buy_date" id="buy_date" autocomplete="off">
                </div>
            </li>
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>设备状态：</label>
                <ul class="col-sm-8 table_btn_list_radio_list" add_name="add_state">
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox-selectedRai"></i>
                        <span>正常</span>
                    </li>
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox"></i>
                        <span>禁用</span>
                    </li>
                </ul>
            </li> -->
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title">折旧方式：</label>
                <div class="col-sm-8">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="add_depreciationMethod" value="年限平均法">
                </div>
            </li> -->
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>资产原值(元)：</label>
                <div class="col-sm-8">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder=""  add_name="add_original_price" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>残值率(%)：</label>
                <div class="col-sm-8">
                    <input type="number" min='0' max="10" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="不得超过10%" add_name="add_residual" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title">残值(元)：</label>
                <div class="col-sm-8">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="add_Estimate_price" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>折旧年份（月份）：</label>
                <div class="col-sm-8">
                    <input type="number" min='0' max="10" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="不得超过120个月" add_name="add_Estimate_userTime" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>已折旧月份：</label>
                <div class="col-sm-8">
                    <input type="number" min='0' max="10" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="不得小于已折旧月份" add_name="add_userTime_ed" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title">月折旧额(元)：</label>
                <div class="col-sm-8">
                    <input type="number" min='0' max="10" class="col-sm-9 BFBFBF_inputStyle add_people_input" readonly placeholder="" add_name="add_userPrice_mon" autocomplete="off">
                </div>
            </li>
            <li class="button_list">
                <button class="btn btn-sm btn-success" id="add_btn">确认添加</button>
                <button class="btn btn-sm btn-success" id="add_AddNew_btn">添加并新增</button>
                <button class="btn btn-sm btn-default cancel_btn">取消</button>
            </li>
        </ul>
        <ul class="animated fadeIn add_hiddenBox" lll="edit_people" id="edit_people">
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>编号：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_num" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>名称：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_name" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>类型：</label>
                <ul class="col-sm-9 table_btn_list_radio_list" add_name="edit_type">
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox-selectedRai"></i>
                        <span>仪器</span>
                    </li>
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox"></i>
                        <span>设备</span>
                    </li>
                </ul>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>用途：</label>
                <ul class="col-sm-9 table_btn_list_radio_list" add_name="edit_yongtu">
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox"></i>
                        <span>专用</span>
                    </li>
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox-selectedRai"></i>
                        <span>公用</span>
                    </li>
                </ul>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>型号规格：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_modelSpecifications" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title">设备功率(kw)：</label>
                <div class="col-sm-9">
                    <input type="number" class=" BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_power" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>购入时间：</label>
                <div class="col-sm-9">
                    <input type="text" class=" BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_buy_date" id="edit_buy_date" autocomplete="off">
                </div>
            </li>
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>设备状态：</label>
                <ul class="col-sm-9 table_btn_list_radio_list" add_name="edit_state">
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox-selectedRai"></i>
                        <span>正常</span>
                    </li>
                    <li class="table_btn_list_radio_list">
                        <i class="iconfont icon-Raidobox"></i>
                        <span>禁用</span>
                    </li>
                </ul>
            </li> -->
            <!-- <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title">折旧方式：</label>
                <div class="col-sm-9">
                    <input type="text" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="edit_depreciationMethod" value="年限平均法">
                </div>
            </li> -->
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>资产原值(元)：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder=""  add_name="edit_original_price" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>残值率(%)：</label>
                <div class="col-sm-9">
                    <input type="number" min='0' max="10" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="不得超过10%" add_name="edit_residual" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title">残值(元)：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" readonly add_name="edit_Estimate_price" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-4 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>折旧年份（月份）：</label>
                <div class="col-sm-8">
                    <input type="number" min='0' max="120" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="不得超过120个月" add_name="edit_Estimate_userTime" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title"><i class="iconfont icon-asterisk table_btn_list_necessary"></i>已折旧月份：</label>
                <div class="col-sm-9">
                    <input type="number" class="col-sm-9 BFBFBF_inputStyle add_people_input" placeholder="" add_name="edit_userTime_ed" autocomplete="off">
                </div>
            </li>
            <li class="form-group table_btn_list">
                <label class="col-sm-3 control-label table_btn_list_title">月折旧额(元)：</label>
                <div class="col-sm-9">
                    <input type="number" min='0' max="10" class="col-sm-9 BFBFBF_inputStyle add_people_input" readonly placeholder="" add_name="edit_userPrice_mon" autocomplete="off">
                </div>
            </li>
            <li class="button_list">
                <button class="btn btn-sm btn-success" id="save_btn">保存</button>
                <button class="btn btn-sm btn-default cancel_btn">取消</button>
            </li>
        </ul>
    </div>

    <!--内容没填完，弹框-->
    <div class="warning_hiddenBox animated fadeIn" id="yz_modal" box="yz_modal">
        您有内容没有填写完哦！
    </div>
    <!--删除人员-->
    <div class="col-sm-12 add_people_list animated fadeIn" id="delete" lll="delete">
        <p class="delete_tip_text">确认删除吗？</p>
        <div class="delete_tip_btn_box">
            <button class="btn btn-sm btn-success">确认</button>
            <button class="btn btn-sm btn-default">取消</button>
        </div>
    </div>
    <!--导入文件-->
    <div class="add_hiddenBox animated fadeIn" id="import" lll="import">
        <p class="import_tip_text">温馨提示：</p>
        <p class="import_tip_text">请下载统一的模版，并按相应的格式在Excel软件中填写您的业务数据，然后再导入到系统中。</p>
        <form action="/Admin/Device/importDevice" method="post" enctype="multipart/form-data" id="file_form">
            <input type="file" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" class="import_tip_text file_upload_btn" id="file_upload" name="devices">
            <div class="import_tip_btn_box">
                <a class="btn btn-sm btn-success" href="/Excel/tpl/设备批量导入模板.xls">下载模板</a>
                <button class="btn btn-sm btn-grey">确定导入</button>
            </div>
        </form>
    </div>
</div>

<script src="ADMIN_PUBLIC/js/jquery.min.js"></script>
<script src="ADMIN_PUBLIC/js/laydate/laydate.js"></script>
<script src="ADMIN_PUBLIC/js/lu_equipmentManagement.js"></script>
<script>
    $(function(){
        window.choose_queryDate = ''
//        window.query_time_start = ''
//        window.query_time_end = ''
//
//        window.buy_date = ''
//        window.buy_date_year = ''
//        window.buy_date_month = ''
//        window.edit_buy_date = ''
        laydate.render({
            elem: '#choose_queryDate', //指定元素
            type:  'month',
            theme: '#2881C1',
            range: true,
            done: function(value, date, endDate){
                var dateVal = date.year+'年'+date.month+'月至'+endDate.year+'年'+endDate.month+'月'
                window.choose_queryDate = dateVal
//                window.query_time_start = date.year+'-'+date.month;
//                window.query_time_end = endDate.year+'-'+endDate.month;
            }
        })
        laydate.render({
            elem: '#buy_date', //指定元素
            type:  'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                var dateVal = date.year+'年'+date.month+'月'
//                window.buy_date = dateVal
//                window.buy_date_year = date.year
//                window.buy_date_month = date.month
            }
        });

        laydate.render({
            elem: '#edit_buy_date', //指定元素
            type:  'month',
            theme: '#2881C1',
            done: function(value, date, endDate){
                var dateVal = date.year+'年'+date.month+'月'
//                window.edit_buy_date = dateVal
            }
        })
    })
</script>
</body>
</html>